import { Canvas, Meta, Source } from '@storybook/blocks'

import { RadixPrimitiveDocsButton } from '../../storybook-utils/primitive-docs-button'
import * as DialogStories from './dialog.stories'

<Meta of={DialogStories} />

<RadixPrimitiveDocsButton name='dialog' />

# Dialog

A window overlaid on either the primary window or another dialog window, rendering the content underneath inert.

## Preview

<Canvas of={DialogStories.Default} />

## Usage

export const importCode = `import {
  Dialog,
  DialogContent,
  DialogDescription,
  DialogHeader,
  DialogTitle,
  DialogTrigger,
} from "@orbitkit/ui/dialog";`

export const usageCode = `<Dialog>
  <DialogTrigger>Open</DialogTrigger>
  <DialogContent>
    <DialogHeader>
      <DialogTitle>Are you absolutely sure?</DialogTitle>
      <DialogDescription>
        This action cannot be undone. This will permanently delete your account
        and remove your data from our servers.
      </DialogDescription>
    </DialogHeader>
  </DialogContent>
</Dialog>`

<Source code={importCode} language='ts' dark />
<Source code={usageCode} language='tsx' dark />

## Examples

### Custom close button

<Canvas of={DialogStories.CustomCloseButton} />
